tremor-kv 0.3.0

A logstash inspured key value extractor
docs.rs failed to build tremor-kv-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: tremor-kv-0.6.2

KV   Latest Version Build Status Quality Checks License Checks Security Checks Code Coverage

kv parser


KV parsing inspired by logstash's kv plugin.

Parses a string into a map. It is possible to split based on different characters that represent either field or key value boundaries.

A good part of the logstash functionality will be handled outside of this function and in a generic way in tremor script.

Use as a library

The kv parser was designed so that KV style parsing could be embedded into tremor's scripting language for extract operations.

The parser can also be used standalone

  let kv = Pattern::compile("%{key}%{%{val}").expect("Failed to build pattern");
  let r = kv.run("this%{is a%{test").expect("Failed to split input");
  assert_eq!(r.len(), 2);
  assert_eq!(r["this"], "is");
  assert_eq!(r["a"], "test");